public with sharing class Cald_DisputeDetailVF {
/*	public Callidus_Dispute__c cdObj {get; set;}
	public Callidus_Dispute__c disputeObj {get; set;}
	
	public Cald_DisputeDetailVF(ApexPages.StandardController myController)
	{
		cdObj = (Callidus_Dispute__c)myController.getRecord();
		disputeObj = [select Name, Filing_Date__c, Status__c, Dispute_Reasons__r.Description__c, Amount__c, Comments__c from Callidus_Dispute__c where id = :cdObj.id];
	}
	
    public PageReference approve()
    {
        try
        {
        	disputeObj.Status__c = 'Approved';
        	update disputeObj;
            ProcessInstance[] prInst = [Select Id from ProcessInstance where TargetObjectId=:disputeObj.Id and Status='Pending'];
            if(prInst.size()>0)     
            {
                ProcessInstanceWorkitem[] prInstWItem = [select Id,OriginalActorId from ProcessInstanceWorkitem where ProcessInstanceId = :prInst[0].Id]; 
    
                Approval.ProcessWorkitemRequest prWkItem = new Approval.ProcessWorkitemRequest();
    
                prWkItem.setWorkitemId(prInstWItem[0].Id);
    
                prWkItem.setComments(disputeObj.Comments__c); 
                
                prWkItem.setAction('Approve'); 

                Approval.ProcessResult prResult = Approval.process(prWkItem);
                
            }
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }
        return null;
    }

    public PageReference reject()
    {
        try
        {
        	disputeObj.Status__c = 'Rejected';
        	update disputeObj;
            ProcessInstance[] prInst = [Select Id from ProcessInstance where TargetObjectId=:disputeObj.Id and Status='Pending'];
            if(prInst.size()>0)     
            {
                ProcessInstanceWorkitem[] prInstWItem = [select Id,OriginalActorId from ProcessInstanceWorkitem where ProcessInstanceId = :prInst[0].Id]; 
    
                Approval.ProcessWorkitemRequest prWkItem = new Approval.ProcessWorkitemRequest();
    
                prWkItem.setWorkitemId(prInstWItem[0].Id);
    
                prWkItem.setComments(disputeObj.Comments__c); 
                
                prWkItem.setAction('Reject'); 

                Approval.ProcessResult prResult = Approval.process(prWkItem);
            }
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }
        return null;
    }
	*/
}